import request from '@/utils/request'

// 查询车辆维修列表
export function listMaintenance(query) {
  return request({
    url: '/ies/maintenance/list',
    method: 'get',
    params: query
  })
}

// 查询车辆维修详细
export function getMaintenance(vehicleId) {
  return request({
    url: '/ies/maintenance/' + vehicleId,
    method: 'get'
  })
}

// 新增车辆维修
export function addMaintenance(data) {
  return request({
    url: '/ies/maintenance',
    method: 'post',
    data: data
  })
}

// 修改车辆维修
export function updateMaintenance(data) {
  return request({
    url: '/ies/maintenance',
    method: 'put',
    data: data
  })
}

// 删除车辆维修
export function delMaintenance(vehicleId) {
  return request({
    url: '/ies/maintenance/' + vehicleId,
    method: 'delete'
  })
}
